<script setup>

import UserSettingModel from "@/model/UserSettingModel.js";

defineProps({
    user: {
        type: Object,
        default:() => new UserSettingModel()
    }
})

</script>

<template>
    <el-row style="width: 100%;">
        <!-- 左边 -->
        <el-col :span="11">
            <el-form-item label="账号长度">
                <el-input v-model="user.accountLength"/>
            </el-form-item>
            <el-form-item label="密码复杂度">
                <el-checkbox-group v-model="user.passwordLever">
                    <el-checkbox :value="0" name="up">
                        包含大写
                    </el-checkbox>
                    <el-checkbox :value="1" name="low">
                        包含小写
                    </el-checkbox>
                    <el-checkbox :value="2" name="x">
                        包含特殊字符
                    </el-checkbox>
                </el-checkbox-group>
            </el-form-item>
            <el-form-item label="密码过期时间 (天)">
                <el-input v-model="user.passwordExpired"/>
            </el-form-item>
            <el-form-item label="初始化密码登陆后要求修改">
                <el-switch v-model="user.forcedModification" :active-value="true" :inactive-value="false"
                           class="ml-2"/>
            </el-form-item>
            <el-form-item label="错误封禁时间 (分钟)">
                <el-input v-model="user.closedTime"/>
            </el-form-item>
        </el-col>
        <el-col :span="1"></el-col>
        <!-- 右边 -->
        <el-col :span="12">
            <el-form-item label="密码长度">
                <el-input v-model="user.passwordLength"/>
            </el-form-item>
            <el-form-item label="初始密码">
                <el-input v-model="user.passwordInit"/>
            </el-form-item>

            <el-form-item label="会话持续时间 (天)">
                <el-input v-model="user.tokenExpired"/>
            </el-form-item>
            <el-form-item label="连续错误次数">
                <el-input v-model="user.errorCount"/>
            </el-form-item>
        </el-col>
    </el-row>
</template>

<style scoped lang="scss">

</style>